var caseIndex = $.getUrlParam('index') || 0;

if($.getUrlParam('type') == "case") {
	casesAjax(detailCase);
} else {
	newsAjax(detailNews);
}

function detailCase(datas) {
	new Vue({
		el: '.mod-content',
		data: {
			oneitem: datas.result.case[caseIndex],
			subUrl: "about-brief.html",
			subNav: datas.result.navigation,
			ifcase: true,
			ifnews: false
		}
	});
}

function detailNews(datas) {
	console.log(datas);
	new Vue({
		el: '.mod-content',
		data: {
			oneitem: datas.result.news[caseIndex],
			subUrl: "about-brief.html",
			subNav: datas.result.navigation,
			ifcase: false,
			ifnews: true
		}
	});
}